﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            CallShowDashBoard(); 
        }
    }

    private void CallShowDashBoard()
    {
        if (Session["RoleId"] != null && Convert.ToInt32(Session["RoleId"]) == (int)Constants.UserRole.Admin)
        {
            dvAdminPan.Visible = true;
            lblAdminName.Text = Session["FullName"].ToString();
            DataTable dt = new DataTable();
            dt = DataAccessClass.GetDashBoardDetails();
            grdDashBoard.DataSource = dt;
            grdDashBoard.DataBind();
        }
    }
}
